package com.youlu.campus.entity;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class RewardValue {

    private Integer startValue = 0;

    private Integer endValue = 0;
    private String tips;

    public String rewardValueTips(String rewardValueAlis) {
        return rewardValueAlis + "达到" + this.tips;
    }

    public Boolean compareValue(Integer inputValue) {
        if (startValue > 0 && endValue > 0) {
            this.tips = startValue + "可领";
            if (startValue <= inputValue && inputValue >= endValue) {
                return Boolean.TRUE;
            }
            return startValue <= inputValue && inputValue <= endValue;
        }
        if (startValue > 0 && endValue == 0) {
            this.tips = startValue + "可领";
            return startValue <= inputValue;
        }
        if (startValue == 0 && endValue > 0) {
            this.tips = endValue + "可领";
            return endValue <= inputValue;
        }
        return Boolean.FALSE;
    }
}
